package com.wanjia.estate.pojo.tax;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class A001 {

    @Data
    public static class Taxbizml<T> implements Serializable {
        @JSONField(ordinal = 0,name = "RWJSHOUSELIST")
        private T rwjshouselist;
    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class RequestOne extends CommonRoot<Taxbizml<RequestRwjshouselist>> {

    }

    @Data
    public static class RequestRwjshouselist implements Serializable {
        @JSONField(ordinal = 1,name = "HOUSEVO")
        private Housevo housevo;
        @JSONField(ordinal = 2,name = "JYFXX")
        private List<Jyfxx> jyfxx;
        @JSONField(ordinal = 3,name = "HYXX")
        private List<Hyxx> hyxx;
        @JSONField(ordinal = 4,name = "WCNZNXX")
        private List<Wcnznxx> wcnznxx;
        @JSONField(ordinal = 5,name = "FYJBXX")
        private Fyjbxx fyjbxx;
        @JSONField(ordinal = 6,name = "FCJYCJXX")
        private Fcjycjxx fcjycjxx;
        @JSONField(ordinal = 7,name = "ZLFFPXX")
        private Zlffpxx zlffpxx;
        @JSONField(ordinal = 8,name = "CEDKXX")
        private Cedkxx cedkxx;
        @JSONField(ordinal = 9,name = "YXWJXX")
        private List<Yxwjxx> yxwjxx;
        @JSONField(ordinal = 10,name = "QT")
        private Qt qt;
    }

    // 全局数据
    @Data
    public static class Housevo implements Serializable {

        @JSONField(ordinal = 11,name = "SJBH")
        private String sjbh;  //收件编号，自己生成
        @JSONField(ordinal = 12,name = "SJRQ", format = "yyyy-MM-dd")
        private Date sjrq;//收件日期，自己生成
        @JSONField(ordinal = 13,name = "ZLFCLFBZ")
        private String zlfclfbz;//先固定写死增量房
        @JSONField(ordinal = 14,name = "SJGSDQ")
        private String sjgsdq;//税务机关代码，去找税务
        @JSONField(ordinal = 15,name = "LRRDM")
        private String lrrdm;//录入人员代码，固定的
    }

    // 交易方信息(多条,买卖方通过买卖方标志区分)
    @Data
    public static class Jyfxx implements Serializable {
        @JSONField(ordinal = 16,name = "JYFUUID")
        private String jyfuuid;//随机的uuid就行
        @JSONField(ordinal = 17,name = "ZRFCSFBZ")
        private String zrfcsfbz;//转让方or承受方
        @JSONField(ordinal = 18,name = "NSRSBH")
        private String nsrsbh;//纳税人就是识别号，自然人就是身份证号
        @JSONField(ordinal = 19,name = "NSRMC")
        private String nsrmc;//纳税人名称，自然人姓名
        @JSONField(ordinal = 20,name = "DZ")
        private String dz;//地址
        @JSONField(ordinal = 21,name = "HYDM")
        private String hydm;
        @JSONField(ordinal = 22,name = "DJZCLXDM")
        private String djzclxdm;
        @JSONField(ordinal = 23,name = "ZZSYBNSR")
        private String zzsybnsr;
        @JSONField(ordinal = 24,name = "DWLSGXDM")
        private String dwlsgxdm;
        @JSONField(ordinal = 25,name = "ZQRBZ")
        private String zqrbz;//主产权人名字，打票用的
        @JSONField(ordinal = 26,name = "SFZJLXD")
        private String sfzjlxd;//201 居民身份证
        @JSONField(ordinal = 27,name = "SFZJHM")
        private String sfzjhm;//身份证号
        @JSONField(ordinal = 28,name = "GJDM")
        private String gjdm;//156 中国
        @JSONField(ordinal = 29,name = "LXDH")
        private String lxdh;//联系电话
        @JSONField(ordinal = 30,name = "BDFE2")
        private BigDecimal bdfe2;//变动份额就是0，或者就是所占份额
        @JSONField(ordinal = 31,name = "SCQDFWFS")
        private String scqdfwfs;
        @JSONField(ordinal = 32,name = "SCQDFWSJ", format = "yyyy-MM-dd")
        private Date scqdfwsj;
        @JSONField(ordinal = 33,name = "SCQDFWCB")
        private BigDecimal scqdfwcb;
        @JSONField(ordinal = 34,name = "BZ")
        private String bz;
        @JSONField(ordinal = 35,name = "SZFE")
        private BigDecimal szfe;//所占份额
        @JSONField(ordinal = 36,name = "FWTCDM")
        private String fwtcdm;//套次查询代码 查表
        @JSONField(ordinal = 37,name = "GMFZXQSBZ")
        private String gmfzxqsbz;//购买方直系亲属标志 N 否 Y 是
        @JSONField(ordinal = 38,name = "YHBZ")
        private String yhbz;//婚姻标志 3 未婚1 已婚2 离异
        @JSONField(ordinal = 39,name = "ZRRBZ")
        private String zrrbz;//自然人标志 1 企业2 自然人
    }

    // 婚姻信息(买卖双方)，其余和上方一样
    @Data
    public static class Hyxx implements Serializable {

        @JSONField(ordinal = 40,name = "JYFUUID")
        private String jyfuuid;
        @JSONField(ordinal = 41,name = "ZRFCSFBZ")
        private String zrfcsfbz;
        @JSONField(ordinal = 42,name = "NSRSBH")
        private String nsrsbh;//身份证号
        @JSONField(ordinal = 43,name = "NSRMC")
        private String nsrmc;
        @JSONField(ordinal = 44,name = "SFZJLXD")
        private String sfzjlxd;
        @JSONField(ordinal = 45,name = "SFZJHM")
        private String sfzjhm;
        @JSONField(ordinal = 46,name = "GJDM")
        private String gjdm;
        @JSONField(ordinal = 47,name = "POGJDM")
        private String pogjdm;//配偶国籍 156 中国
        @JSONField(ordinal = 48,name = "POZJLX_DM")
        private String pozjlx_dm;//配偶证件类型
        @JSONField(ordinal = 49,name = "POZJHM")
        private String pozjhm;//配偶身份证件号码
        @JSONField(ordinal = 50,name = "POXM")
        private String poxm;//配偶姓名
    }

    // 未成年子女信息(买卖双方)，其余和上方一样
    @Data
    public static class Wcnznxx implements Serializable {
        @JSONField(ordinal = 51,name = "JYFUUID")
        private String jyfuuid;
        @JSONField(ordinal = 52,name = "ZRFCSFBZ")
        private String zrfcsfbz;
        @JSONField(ordinal = 53,name = "NSRSBH")
        private String nsrsbh;
        @JSONField(ordinal = 54,name = "NSRMC")
        private String nsrmc;
        @JSONField(ordinal = 55,name = "SFZJLXD")
        private String sfzjlxd;
        @JSONField(ordinal = 56,name = "SFZJHM")
        private String sfzjhm;
        @JSONField(ordinal = 57,name = "GJDM")
        private String gjdm;
        @JSONField(ordinal = 58,name = "WCNZNZJLX_DM")
        private String wcnznzjlxDm;//未成年子女证件类型
        @JSONField(ordinal = 59,name = "WCNZNZJHM")
        private String wcnznzjhm;//未成年子女证件号码
        @JSONField(ordinal = 60,name = "WCNZNXM")
        private String wcnznxm;//未成年子女姓名
        @JSONField(ordinal = 61,name = "CZWCNBJ")
        private String czwcnbj;//是否存在未成年人标志 1 有未成年子女2 无未成年子女3 未成年子女有父母信息4 未成年子女无父母信息
    }

    // 房源基本信息
    @Data
    public static class Fyjbxx implements Serializable {
        @JSONField(ordinal = 62,name = "FYJBXXUUID")
        private String fyjbxxuuid;//房源基本信息UUID 唯一编号,随机生成
        @JSONField(ordinal = 63,name = "WBID")
        private String wbid;//外部ID，暂时不知道
        @JSONField(ordinal = 64,name = "BDCDYH")
        private String bdcdyh;
        @JSONField(ordinal = 65,name = "XZQHSZDM")
        private String xzqhszdm;//行政区划代码 丹徒区
        @JSONField(ordinal = 66,name = "JDXZDM")
        private String jdxzdm;//街道乡镇代码
        @JSONField(ordinal = 67,name = "TDFWDZ")
        private String tdfwdz;//土地房屋地址
        @JSONField(ordinal = 68,name = "TDSYZBH")
        private String tdsyzbh;
        @JSONField(ordinal = 69,name = "TDSYBH")
        private String tdsybh;
        @JSONField(ordinal = 70,name = "FWZH")
        private String fwzh;//房屋栋号 产权人房屋套次查询
        @JSONField(ordinal = 71,name = "DYH")
        private String dyh;//单元号 产权人房屋套次查询
        @JSONField(ordinal = 72,name = "LC2")
        private Integer lc2; //楼层 产权人房屋套次查询
        @JSONField(ordinal = 73,name = "FJH")
        private String fjh;//房间号 产权人房屋套次查询
        @JSONField(ordinal = 74,name = "JZJGLXDM")
        private String jzjglxdm; //合同查询 "钢筋混凝土" 查表3.33
        @JSONField(ordinal = 75,name = "CXDM")
        private String cxdm;//朝向代码 99其他
        @JSONField(ordinal = 76,name = "MJ")
        private BigDecimal mj;//面积 合同查询
        @JSONField(ordinal = 77,name = "TNMJ")
        private BigDecimal tnmj;//套内面积 合同查询
        @JSONField(ordinal = 78,name = "GLMJ")
        private BigDecimal glmj;
        @JSONField(ordinal = 79,name = "CCSMJ")
        private BigDecimal ccsmj;
        @JSONField(ordinal = 80,name = "ZXCCKMJ")
        private BigDecimal zxcckmj;
        @JSONField(ordinal = 81,name = "CKMJ")
        private BigDecimal ckmj;
        @JSONField(ordinal = 82,name = "JZNF")
        private String jznf;
        @JSONField(ordinal = 83,name = "DLMC")
        private String dlmc;
        @JSONField(ordinal = 84,name = "XQMC")
        private String xqmc;
        @JSONField(ordinal = 85,name = "LCZS")
        private String lczs;//楼层总数 产权人房屋套次查询
        @JSONField(ordinal = 86,name = "FWTDZJG")
        private BigDecimal fwtdzjg;//房屋/土地总价格 首次登记证明
        @JSONField(ordinal = 87,name = "FYXXLY")
        private String fyxxly;//房源信息来源区分分类：1 交易信息（住建）、2 交易信息（不动产）、3 一窗前台采集、4 一窗纳税人输入
        @JSONField(ordinal = 88,name = "SJGSDQ")
        private String sjgsdq;//数据归属地区 对应行政区划代码 镇江丹徒
        @JSONField(ordinal = 90,name = "BZ")
        private String bz;
    }

    // 房产交易信息
    @Data
    public static class Fcjycjxx implements Serializable {
        @JSONField(ordinal = 90,name = "FWUUID")
        private String fwuuid;
        @JSONField(ordinal = 91,name = "FCJYFSDM")
        private String fcjyfsdm;//房产交易方式代码 3.28  01买卖
        @JSONField(ordinal = 92,name = "QSQSZYLBDM")
        private String qsqszylbdm;//契税权属转移类别代码 11出让
        @JSONField(ordinal = 93,name = "QSQSZYDXDM")
        private String qsqszydxdm;//契税权属转移对象代码 20100增量房
        @JSONField(ordinal = 94,name = "QSQSZYYTDM")
        private String qsqszyytdm;//契税权属转移用途代码 101住宅用地
        @JSONField(ordinal = 95,name = "HTQDRQ", format = "yyyy-MM-dd")
        private Date htqdrq;//合同签订日期 合同查询 coRegDate
        @JSONField(ordinal = 96,name = "HTBH")//
        private String htbh;// 合同编号 合同查询 coRegID
        @JSONField(ordinal = 97,name = "TDZSSKCCB")
        private BigDecimal tdzsskccb;
        @JSONField(ordinal = 98,name = "DQYSKJE")
        private BigDecimal dqyskje;
        @JSONField(ordinal = 99,name = "FWCQZSH")
        private String fwcqzsh;
        @JSONField(ordinal = 100,name = "SFPTZFBS")
        private String sfptzfbs;//是否普通住房标志  1 是 0 否
        @JSONField(ordinal = 101,name = "GRSDSKCHLFY")
        private BigDecimal grsdskchlfy;
        @JSONField(ordinal = 102,name = "KFBDCXMBH")
        private String kfbdcxmbh;
        @JSONField(ordinal = 103,name = "BDCXMMC")
        private String bdcxmmc;//小区名称 套次，坐落
        @JSONField(ordinal = 104,name = "HTJE")
        private BigDecimal htje;//合同金额 合同查询 pricesum
        @JSONField(ordinal = 105,name = "JYJG")
        private BigDecimal jyjg;
        @JSONField(ordinal = 106,name = "DJ")
        private BigDecimal dj;//单价
        @JSONField(ordinal = 107,name = "WBJYJG")
        private BigDecimal wbjyjg;
        @JSONField(ordinal = 108,name = "CJJGSFHS")
        private String cjjgsfhs;//成交价是否含税标志  1 是 0 否
        @JSONField(ordinal = 109,name = "BCSBJYSFSYZRFZKP")
        private String bcsbjysfsyzrfzkp;//本次申报交易是否属于转让方自开票 1 是 0 否
        @JSONField(ordinal = 110,name = "BCJYDFZZSSLHZSL")
        private BigDecimal bcjydfzzsslhzsl;
        @JSONField(ordinal = 111,name = "CEZSZZSBZ")
        private String cezszzsbz;//差额征收增值税标志 1 是 0 否
        @JSONField(ordinal = 112,name = "SBSXDM1")
        private String sbsxdm1;
        @JSONField(ordinal = 113,name = "BZ")
        private String bz;
        @JSONField(ordinal = 114,name = "DQYSSKSSYF")
        private String dqysskssyf;//当前应收税款所属月份
        @JSONField(ordinal = 115,name = "FWLX_DM")
        private String fwlxDm;//房屋类型代码 3.39 01住宅
        @JSONField(ordinal = 116,name = "CSFGYFS_DM")
        private String csfgyfsDm;//买方共有方式 1 单独共有，2 共同共有，3 按份共有
        /*@JSONField(ordinal = 117,name = "ZRFGYFS_DM")
        private String zrfgyfsDm;*/
        @JSONField(ordinal = 118,name = "SFBZQS")
        private String sfbzqs;//是否不征契税 Y 不征，N 征收
        @JSONField(ordinal = 119,name = "QSBZSXM_DM")
        private String qsbzsxmDm;
        @JSONField(ordinal = 120,name = "QSDJRQ", format = "yyyy-MM-dd")
        private Date qsdjrq;
       /* @JSONField(ordinal = 121,name = "ZJNSRSBH", format = "yyyy-MM-dd")
        private Date zjnsrsbh;*/
    }

    // 增值税发票信息(纳税人购房款发票)
    @Data
    public static class Zlffpxx implements Serializable {
        @JSONField(ordinal = 120,name = "FPDM")
        private String fpdm;
        @JSONField(ordinal = 121,name = "FPHM")
        private String fphm;
    }

    // 差额征收抵扣信息
    @Data
    public static class Cedkxx implements Serializable {
        @JSONField(ordinal = 122,name = "DKXXXH")
        private Long dkxxxh;//抵扣信息序号,报文内的顺序号从1开始
        @JSONField(ordinal = 123,name = "DKXXFL")
        private String dkxxfl;//抵扣分类 1 购房发票 2 装修发票 ...
        @JSONField(ordinal = 124,name = "DKPJLX")
        private String dkpjlx;//票据类型 1 发票 2 税票
        @JSONField(ordinal = 125,name = "DKXXDM")
        private String dkxxdm;//代码 发票代码或税票字轨
        @JSONField(ordinal = 126,name = "DKXXHM")
        private String dkxxhm;//号码 发票号码或税票号码
        @JSONField(ordinal = 127,name = "DKXXKPRQ", format = "yyyy-MM-dd")
        private Date dkxxkprq;//开票日期 填发日期
        @JSONField(ordinal = 128,name = "DKXXPMJE")
        private BigDecimal dkxxpmje;//票面金额 票面含税销售金额（可抵扣金额）
    }

    // 影像文件信息(根据要求报送)
    @Data
    public static class Yxwjxx implements Serializable {
        @JSONField(ordinal = 129,name = "ZLDM")
        private String zldm;//资料代码 资料编号请参见本部分附表
        @JSONField(ordinal = 130,name = "YXWJBH")
        private String yxwjbh;//影像文件编号
        @JSONField(ordinal = 131,name = "YXWJMC")
        private String yxwjmc;//影像文件名称 中文，描述这是什么文件
        @JSONField(ordinal = 132,name = "YXWJFILENAME")
        private String yxwjfilename;//影像文件名 影像文件名
        @JSONField(ordinal = 133,name = "YXWJLX")
        private String yxwjlx;//影像文件类型 文件后缀格式，仅限 PDF 文件
        @JSONField(ordinal = 134,name = "SFBB")
        private String sfbb;//是否必报 是否必报１必报２非必报
        @JSONField(ordinal = 135,name = "YXWJDZ")
        private String yxwjdz;//提交税务审核的文件
    }

    // 其他
    @Data
    public static class Qt implements Serializable {
        @JSONField(ordinal = 136,name = "SFFGYRDP")
        private String sffgyrdp; //是否共有人打票
    }

//    @Data
//    public static class Response {
//        private Integer code;
//        private ResponseDataOne data;
//        private String message;
//    }
//    @Data
//    public static class ResponseDataOne implements Serializable {
//        private TaxbizmlOne taxbizml;
//    }
//    @Data
//    public static class TaxbizmlOne implements Serializable {
//        private Rwjshouselist rwjshouselist;
//    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class Response extends CommonRoot<Taxbizml<Rwjshouselist>> {

    }

    @Data
    public static class Rwjshouselist implements Serializable {
        @JSONField(ordinal = 137,name = "FHM")
        private String fhm;
        @JSONField(ordinal = 138,name = "FHXX")
        private String fhxx;
        @JSONField(ordinal = 139,name = "SJBH")
        private String sjbh;
        @JSONField(ordinal = 140,name = "HTBH")
        private String htbh;
        @JSONField(ordinal = 141,name = "JYUUID")
        private String jyuuid;
        @JSONField(ordinal = 142,name = "FWUUID")
        private String fwuuid;
    }
}
